]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Fix workspaces accumulating on each restart.
authorJasper St. Pierre <jstpierre@mecheye.net>
Sat, 19 Mar 2011 23:36:17 +0000 (19:36 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Mon, 21 Mar 2011 21:45:00 +0000 (17:45 -0400)
Main._nWorkspacesChanged was racing with Main._checkWorkspaces.
If _checkWorkspaces won the race, _workspaces was uninitialized.
Because of this, _checkWorkspaces only noticed workspaces
with windows on them, leading it to believe the last workspace wasn't
empty, and added a new, empty workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=645343

js/ui/main.js

index 47dadef3b551142f3b5fc3b74705a30a2e6fca89..155cdb2991752a80aad61d8cad18dae5d3ddd623 100644 (file)
@@ -223,7 +223,7 @@ function start() {
     global.screen.connect('window-entered-monitor', _windowEnteredMonitor);
     global.screen.connect('window-left-monitor', _windowLeftMonitor);
 
-    Mainloop.idle_add(_nWorkspacesChanged);
+    _nWorkspacesChanged();
 }
 
 let _workspaces = [];